package com.example.wujinapi.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.wujinapi.comm.R;
import com.example.wujinapi.entity.Contacts;
import com.example.wujinapi.entity.wxDecryptPhoneUser;
import com.example.wujinapi.service.ContactsService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;

/**
 * (Contacts)表控制层
 *
 * @author makejava
 * @since 2023-07-20 00:07:35
 */
@RestController
@RequestMapping("contacts/")
public class ContactsController extends ApiController {
    /**
     * 服务对象
     */
    @Resource
    private ContactsService contactsService;


    /**
     * 获取联系方式内容
     */
    @GetMapping("/getContacts")
    public R getContacts(){
        try {
            Contacts res= contactsService.getContactNotNull();
            return R.ok().put("data",res);
        } catch (Exception e) {
            e.printStackTrace();
            return R.error(400,e.getMessage());
        }
    }


}
